﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace AjaxChatWebApp
{
    public partial class FacebookChatPage : System.Web.UI.Page
    {
        HttpClient httpClient = new HttpClient();
        protected void Page_Load(object sender, EventArgs e)
        {
            httpClient.BaseAddress = new Uri("http://localhost:62865");
        }

        protected void btLogOut_Click(object sender, EventArgs e)
        {
            HttpResponseMessage response = httpClient.DeleteAsync("api/FBUsers").Result;

            if (response.IsSuccessStatusCode)
                Response.Redirect("~/Account/Login.aspx");
        }
    }
}